package com.evola.dbsm.view.navigation
{
	[Bindable]
	public class NavigationModel
	{
		
		public static const DEFAULT_SCREEN : String = "defaultScreen";
		public static const VIEW_PROJECTS : String = "viewProjects";
		public static const VIEW_PROJECT_SCRIPTS : String = "viewProjectScripts";
		public static const EDIT_PROJECT : String = "editProject";
		public static const EDIT_SCRIPT : String = "editScript";
		
		private static var indices : Array = ["defaultScreen", "viewProjects", "viewProjectScripts", "editProject", "editScript"];
		
		public var selectedViewIndex : int = 0;
		
		public function NavigationModel()
		{
		}
		
		public function selectView(viewName:String):void
		{
		
			var index : int = indices.indexOf(viewName);
			
			if(index < 0 || index >= indices.length)
				index = 0;
			
			selectedViewIndex = index;
		}
	}
}